Ubuntu 12.04
Sponsored Link

OpenStack Havana - Configure Glance
2013/11/22
 
Install and Configure OpenStack Image Service (Glance).
[1] Install Glance

root@dlp:~#
aptitude -y install glance
[2] Add a User and DB for Glance to MySQL.
root@dlp:~#
mysql -u root -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.5.34-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# set any password for 'password' section

mysql>
create database glance character set utf8;

Query OK, 1 row affected (0.00 sec)
mysql>
grant all privileges on glance.* to glance@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
mysql>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
mysql>
exit

Bye
[3] Configure Glance
root@dlp:~#
vi /etc/glance/glance-registry.conf
# line 32 : change ( the one added in MySQL )

sql_connection =
mysql://glance:password@10.0.0.30/glance
# line 84 : change like follows ( the one added in Keystone )

[keystone_authtoken]
auth_host =
10.0.0.30

auth_port = 35357
auth_protocol = http
admin_tenant_name =
service

admin_user =
glance

admin_password =
servicepassword
# add at the last

flavor = keystone
root@dlp:~#
vi /etc/glance/glance-api.conf
# line 55 : change ( the one added in MySQL )

sql_connection =
mysql://glance:password@10.0.0.30/glance
# line 429 : change like follows ( the one added in Keystone )

[keystone_authtoken]
auth_host =
10.0.0.30

auth_port = 35357
auth_protocol = http
admin_tenant_name =
service

admin_user =
glance

admin_password =
servicepassword
# add at the last

flavor = keystone
root@dlp:~#
glance-manage db_sync

root@dlp:~#
for service in api registry; do
service glance-$service restart
done

glance-api stop/waiting
glance-api start/running, process 2460
glance-registry stop/waiting
glance-registry start/running, process 2465
 
Tweet